package org.frend.rpc;

import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;

import java.util.List;

public interface ProcessService {

    /**
     * 部署流程
     * @param name
     * @param resource
     * @return
     */
    Deployment deploymentProcessDefinition(String name, String resource);

    /**
     * 查看部署流程
     * @return
     */
    List<ProcessDefinition> queryCreateProcessDefinition();

    /**
     * 启动流程实例
     * @param processDefinitionKey
     * @return
     */
    ProcessInstance startProcessInstanceByKey(String processDefinitionKey);

    /**
     * 查看我的任务
     * @param assignee
     * @return
     */
    List<Task> getTaskAssignee(String assignee);

}
